package com.gwsoft.mm.dao.imple;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gwsoft.mm.dao.MonitorFilter;
import com.gwsoft.mm.dao.MonitorFilterDao;

@Repository("mfdao")
public class MonitorFilterDaoImple extends IbatisSupportDao implements MonitorFilterDao {
		
	public void addMonitorFilter(Map<String, Object> map) throws SQLException {
		getSqlMapClientTemplate().insert("addMonitorFilter", map);
	}

	public void deleteMonitorFilter(int id) throws SQLException {
		getSqlMapClientTemplate().delete("deleteMonitorFilter", id);
	}

	@SuppressWarnings("unchecked")
	public List<MonitorFilter> getMonitorFilter(Map<String, Object> map) throws SQLException {
		return getSqlMapClientTemplate().queryForList("getMonitorFilter", map);
	}

	public int getMonitorFilterCount(Map<String, Object> map) throws SQLException {
		return (Integer)getSqlMapClientTemplate().queryForObject("getMonitorFilterCount", map);
	}

	public void modifyMonitorFilter(Map<String, Object> map) throws SQLException {
		getSqlMapClientTemplate().update("modifyMonitorFilter", map);
	}

	@SuppressWarnings("unchecked")
	public List<Map<String, Object>> getAllMonitorCategory(
			Map<String, Object> map) throws SQLException {
		return getSqlMapClientTemplate().queryForList("getAllMonitorCategory", map);
	}
}
